From e6fd9d4471349476b106374b81fc0655e090486b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Thu, 6 Dec 2018 17:06:28 +0100 Subject: [PATCH] babl: special case palette formats in babl_format_with_space For now, re-return the original passed in format, this will as a starter not crash - while the color management is non-functional; the special casing will be made more elaborate with space support in babl-palette. --- babl/babl-format.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/babl/babl-format.c b/babl/babl-format.c index 7b81cae..e532417 100644 --- a/babl/babl-format.c +++ b/babl/babl-format.c @@ -727,6 +727,13 @@ babl_format_with_space (const char *encoding, const Babl *space) if (BABL_IS_BABL (example_format)) { + if (babl_format_is_palette (example_format)) + { + /* XXX we should allocate a new palette name, and + duplicate the path data, converted for new space + */ + return example_format; + } encoding = babl_get_name (example_format); if (babl_format_get_space (example_format) != babl_space ("sRGB")) { -- 2.30.2